<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 传统方式定义对象
        const name = 'Hudie';
        const age = 20;
        const user01 = {name:name,age:age};
        console.log(user01);
        // ES6
        const user02 = {name,age};
        console.log(user02);
    </script>
</body>
</html>